package com.itheima.controller;

import com.alibaba.fastjson.JSONObject;
import com.itheima.entity.common.Result;
import com.itheima.service.impl.ProductService;
import com.itheima.service.impl.QueryGrantTypeService;
import com.itheima.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    private QueryGrantTypeService queryGrantTypeService;

    @GetMapping("test")
    public JSONObject test(Integer resourceType) {
        String result = queryGrantTypeService.getResult(resourceType);
        return ResultUtils.successData(result, "成功");
    }

}
